package com.slj.controller;

import com.slj.comm.responce.R;
import com.slj.model.dto.OrderDTO;
import com.slj.model.entity.PurchaseSettlement;
import com.slj.model.vo.SupplierOrderGroupVo;
import com.slj.service.PurchaseOrdersService;
import com.slj.service.PurchaseSettlementService;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 采购结算表 前端控制器
 * </p>
 *
 * @author 礼俊
 * @since 2025-09-20 22:46
 */
@RestController
@RequestMapping("/purchaseSettlement")
public class PurchaseSettlementController {
    @Autowired
    private PurchaseSettlementService purchaseSettlementService;
    //生成结算订单

    //查询采购结算单
    @GetMapping("/list")
    public R<List<SupplierOrderGroupVo>> list() {
        List<SupplierOrderGroupVo> supplierOrderGroupVos = purchaseSettlementService.groupList();
        return R.success(supplierOrderGroupVos);
    }
}
